﻿using System;
using System.ComponentModel.DataAnnotations;
using TimberSmart.Model.Common;

namespace TimberSmart.Model.Business
{
    public class BusinessEntity
    {

        public int Id { get; set; }

        [Required, MaxLength(255)]
        public string CompanyName { get; set; }

        [MaxLength(15)]
        public string ABN { get; set; }

        [Phone]
        public string Phone { get; set; }

        [Phone]
        public string Fax { get; set; }

        [EmailAddress]
        public string Email { get; set; }

        public bool GST { get; set; }

        [Url]
        public string Web { get; set; }

        public DateTime DateCreated { get; set; }      

        public bool Active { get; set; }

        [Timestamp]
        public byte[] RowVersion { get; set; }

        //FK's
        public int? TermId { get; set; }
        public virtual BusinessEntityTerm CreditTerm { get; set; }

        public int? BusinessTypeId { get; set; }
        public virtual BusinessEntityType BusinessType { get; set; }

    }
}
